package review.chapter00;

/**
 * Enjoy programming!!!
 * Time: 2021/12/19 -  22:11
 */
import java.util.Scanner;
public class Max {
    public static void main(String[] args){
        System.out.print("请输入要比较的数：");
        Scanner in = new Scanner(System.in);
        int n1 = in.nextInt();
        int n2 = in.nextInt();
        int n3 = in.nextInt();

//        int max1 = n1 > n2 ? n1 : n2;
//        int max = max1 > n3 ? max1 : n3;
        int max = Math.max(n2, n3);
        int amax = Math.max(max, n1);
        System.out.printf("%d, %d, %d中的最大值是：%d",n1, n2, n3, amax);
    }
}
